package com.toKnow.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.toKnow.model.dto.AuthorInfoDTO;

import java.sql.Date;
import java.sql.Timestamp;

public class AuthorInfoVo {
  @JsonProperty(value = "user_id")
  @JSONField(name = "user_id")
  private Integer id;
  private String username;
  private String email;
  @JsonProperty(value = "register_date")
  @JSONField(name = "register_date")
  private Timestamp registerDate;
  private String avatar;
  private String nickname;
  private Integer sex;
  private Date birthday;
  private String location;
  private String education;
  private String university;
  @JsonProperty(value = "follow_times")
  @JSONField(name = "follow_times")
  private Integer followTimes;
  @JsonProperty(value = "followed_times")
  @JSONField(name = "followed_times")
  private Integer followedTimes;
  @JsonProperty(value = "article_num")
  @JSONField(name = "article_num")
  private Integer articleNum;
  @JsonProperty(value = "source_num")
  @JSONField(name = "source_num")
  private Integer sourceNum;
  @JsonProperty(value = "column_num")
  @JSONField(name = "column_num")
  private Integer columnNum;
  @JsonProperty(value = "read_times")
  @JSONField(name = "read_times")
  private Integer readTimes;
  @JsonProperty(value = "download_times")
  @JSONField(name = "download_times")
  private Integer downloadTimes;
  @JsonProperty(value = "like_times")
  @JSONField(name = "like_times")
  private Integer likeTimes;
  @JsonProperty(value = "comment_times")
  @JSONField(name = "comment_times")
  private Integer commentTimes;
  @JsonProperty(value = "collect_times")
  @JSONField(name = "collect_times")
  private Integer collectTimes;
  private String description;
  private String sign;
  @JsonProperty(value = "is_follow")
  @JSONField(name = "is_follow")
  private Boolean isFollow;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public Timestamp getRegisterDate() {
    return registerDate;
  }

  public void setRegisterDate(Timestamp registerDate) {
    this.registerDate = registerDate;
  }

  public String getAvatar() {
    return avatar;
  }

  public void setAvatar(String avatar) {
    this.avatar = avatar;
  }

  public String getNickname() {
    return nickname;
  }

  public void setNickname(String nickname) {
    this.nickname = nickname;
  }

  public Integer getSex() {
    return sex;
  }

  public void setSex(Integer sex) {
    this.sex = sex;
  }

  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }

  public String getLocation() {
    return location;
  }

  public void setLocation(String location) {
    this.location = location;
  }

  public String getEducation() {
    return education;
  }

  public void setEducation(String education) {
    this.education = education;
  }

  public String getUniversity() {
    return university;
  }

  public void setUniversity(String university) {
    this.university = university;
  }

  public Integer getFollowTimes() {
    return followTimes;
  }

  public void setFollowTimes(Integer followTimes) {
    this.followTimes = followTimes;
  }

  public Integer getFollowedTimes() {
    return followedTimes;
  }

  public void setFollowedTimes(Integer followedTimes) {
    this.followedTimes = followedTimes;
  }

  public Integer getArticleNum() {
    return articleNum;
  }

  public void setArticleNum(Integer articleNum) {
    this.articleNum = articleNum;
  }

  public Integer getSourceNum() {
    return sourceNum;
  }

  public void setSourceNum(Integer sourceNum) {
    this.sourceNum = sourceNum;
  }

  public Integer getColumnNum() {
    return columnNum;
  }

  public void setColumnNum(Integer columnNum) {
    this.columnNum = columnNum;
  }

  public Integer getReadTimes() {
    return readTimes;
  }

  public void setReadTimes(Integer readTimes) {
    this.readTimes = readTimes;
  }

  public Integer getDownloadTimes() {
    return downloadTimes;
  }

  public void setDownloadTimes(Integer downloadTimes) {
    this.downloadTimes = downloadTimes;
  }

  public Integer getLikeTimes() {
    return likeTimes;
  }

  public void setLikeTimes(Integer likeTimes) {
    this.likeTimes = likeTimes;
  }

  public Integer getCommentTimes() {
    return commentTimes;
  }

  public void setCommentTimes(Integer commentTimes) {
    this.commentTimes = commentTimes;
  }

  public Integer getCollectTimes() {
    return collectTimes;
  }

  public void setCollectTimes(Integer collectTimes) {
    this.collectTimes = collectTimes;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String getSign() {
    return sign;
  }

  public void setSign(String sign) {
    this.sign = sign;
  }

  public Boolean getFollow() {
    return isFollow;
  }

  public void setFollow(Boolean follow) {
    isFollow = follow;
  }

  @Override
  public String toString() {
    return "AuthorInfoVo{" +
        "id=" + id +
        ", username='" + username + '\'' +
        ", email='" + email + '\'' +
        ", registerDate=" + registerDate +
        ", avatar='" + avatar + '\'' +
        ", nickname='" + nickname + '\'' +
        ", sex=" + sex +
        ", birthday=" + birthday +
        ", location='" + location + '\'' +
        ", education='" + education + '\'' +
        ", university='" + university + '\'' +
        ", followTimes=" + followTimes +
        ", followedTimes=" + followedTimes +
        ", articleNum=" + articleNum +
        ", sourceNum=" + sourceNum +
        ", columnNum=" + columnNum +
        ", readTimes=" + readTimes +
        ", downloadTimes=" + downloadTimes +
        ", likeTimes=" + likeTimes +
        ", commentTimes=" + commentTimes +
        ", collectTimes=" + collectTimes +
        ", description='" + description + '\'' +
        ", sign='" + sign + '\'' +
        ", isFollow=" + isFollow +
        '}';
  }

  public AuthorInfoVo() {
  }

  public AuthorInfoVo(Integer id, String username, String email, Timestamp registerDate, String avatar, String nickname, Integer sex, Date birthday, String location, String education, String university, Integer followTimes, Integer followedTimes, Integer articleNum, Integer sourceNum, Integer columnNum, Integer readTimes, Integer downloadTimes, Integer likeTimes, Integer commentTimes, Integer collectTimes, String description, String sign, Boolean isFollow) {
    this.id = id;
    this.username = username;
    this.email = email;
    this.registerDate = registerDate;
    this.avatar = avatar;
    this.nickname = nickname;
    this.sex = sex;
    this.birthday = birthday;
    this.location = location;
    this.education = education;
    this.university = university;
    this.followTimes = followTimes;
    this.followedTimes = followedTimes;
    this.articleNum = articleNum;
    this.sourceNum = sourceNum;
    this.columnNum = columnNum;
    this.readTimes = readTimes;
    this.downloadTimes = downloadTimes;
    this.likeTimes = likeTimes;
    this.commentTimes = commentTimes;
    this.collectTimes = collectTimes;
    this.description = description;
    this.sign = sign;
    this.isFollow = isFollow;
  }

  public AuthorInfoVo(AuthorInfoDTO userInfo) {
    this.id = userInfo.getId();
    this.username = userInfo.getUsername();
    this.email = userInfo.getEmail();
    this.registerDate = userInfo.getRegisterDate();
    this.avatar = userInfo.getAvatar();
    this.nickname = userInfo.getNickname();
    this.sex = userInfo.getSex();
    this.birthday = userInfo.getBirthday();
    this.location = userInfo.getLocation();
    this.followedTimes = userInfo.getFollowedTimes();
    this.followTimes = userInfo.getFollowTimes();
    this.articleNum = userInfo.getArticleNum();
    this.sourceNum = userInfo.getSourceNum();
    this.columnNum = userInfo.getColumnNum();
    this.readTimes = userInfo.getReadTimes();
    this.downloadTimes = userInfo.getDownloadTimes();
    this.likeTimes = userInfo.getLikeTimes();
    this.commentTimes = userInfo.getCommentTimes();
    this.collectTimes = userInfo.getCollectTimes();
    this.description = userInfo.getDescription();
    this.sign = userInfo.getSign();

    this.education = userInfo.getEducation();
    this.university = userInfo.getUniversity();
    this.isFollow = userInfo.getFollow();
  }
}
